package com.oxygen.design.proxy.interfaces.impl;

import com.oxygen.design.proxy.interfaces.Image;

/**
 * @author wangjie
 * @title: RealImage
 * @description: TODO
 * @date 2022/3/30 21:19
 **/
public class RealImage implements Image {

    private String fileName;

    public RealImage(String fileName) {
        this.fileName = fileName;
        loadFromDisk(fileName);
    }

    @Override
    public void display() {
        System.out.println("Displaying " + fileName);
    }

    private void loadFromDisk(String fileName) {
        System.out.println("Loading " + fileName);
    }
}